#ifndef ADJUST_H
#define ADJUST_H

#include <iostream>
#include <vector>
#include <string>
#include <Eigen/Eigen>
#include <Eigen/Dense>
#include <Eigen/Geometry>
#include <Eigen/Eigenvalues>
#include "cloud_data.hpp"
#include "datatype.h"
// #include "read_config.h"
// #include "glog/logging.h" /
class adjust
{
private:
    const double degree2arc = 3.1415926 / 180.0;
    const double arc2degree = 180 / 3.1415926;
    float scan_period_ = 0.1;
    Eigen::Vector3f velocity_;
    Eigen::Vector3f angular_rate_;
    Eigen::Matrix3f UpdateMatrix(float real_time);
    // ReadConfigCommon readconfig_;
    // proprecess_config proprecess_config_;

    double discor_param[16] = {
        1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 1.0};

    bool ReadProConfig(const std::map<string, string> &m, proprecess_config &conf);

public:
    adjust(/* args */);
    ~adjust();
    void AdjustPoints(LidarImu &lidar_imu_, CloudData::CLOUD_PTR &output);
    bool AdjustPoints(CloudData::CLOUD &lidar_imu_, CloudData::CLOUD &output, ImuData &imu_data);
    CloudData::CLOUD AdjustPoints(CloudData::CLOUD_PTR lidar_imu_, CloudData::CLOUD output, ImuData imu_data, double time);
};

#endif